package com.biz.primus.ms.product.feign;

import com.biz.primus.base.enums.vendor.VendorType;
import com.biz.primus.commodity.vo.CommodityVo;
import com.biz.primus.commodity.vo.DepotCommodityReqVo;
import com.biz.primus.commodity.vo.DepotCommodityVo;
import com.biz.primus.commodity.vo.frontend.ProductCustomModelVo;
import com.biz.primus.model.depot.vo.DepotPromotionReqVo;
import com.biz.primus.model.depot.vo.DepotPromotionRespVo;
import com.biz.primus.ms.product.interfaces.vo.CommodityCatchVo;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author defei
 * @date 2017/9/13
 */
@FeignClient(qualifier = "commodityFeignClient", name = "service-commodity")
public interface CommodityFeignClient {


    @GetMapping("getProductCustomModelVo")
    ProductCustomModelVo getProductCustomModelVo(@RequestParam("productCode") String productCode,@RequestParam("categoryId") String categoryId);

    @PostMapping("depotPromotions")
    List<DepotPromotionRespVo> depotPromotions(@RequestBody List<DepotPromotionReqVo> depotPromotionReqVos);

    @PostMapping("soa/commodityService/depotCommodities")
    List<DepotCommodityVo> depotCommodities(@RequestBody List<DepotCommodityReqVo> reqVos);

    @PostMapping("soa/commodityService/depotCommodity")
    DepotCommodityVo depotCommodity(@RequestBody DepotCommodityReqVo reqVo);


    @PostMapping("soa/commodityService/findCommoditiesByCodes")
    List<CommodityVo> findCommoditiesByCodes(@RequestBody List<String> productCodes);

    @GetMapping("soa/commodityService/findCommodityByCode")
    CommodityVo findCommodityByCode(@RequestParam("productCode") String productCode);

    @PostMapping("soa/commodityService/getCommodityCatch")
    CommodityCatchVo getCommodityCatch(@RequestParam("productType") Integer productType);


    @PostMapping("saleGeoIdsByCodes")
    List<String> saleGeoIdsByCodes(@RequestBody List<String> typeAProductCodes);

    @GetMapping("saleGeoIdByCode")
    String saleGeoIdByCode(@RequestParam("productCode") String productCode);

    @GetMapping("soa/commodityService/getTypeProductCodes")
    List<String> getTypeProductCodes(@RequestParam("productType") VendorType vendorType);
}
